<h3>Horizontal Form</h3>

<%= form_with_source do %>
  <%= bootstrap_form_with model: @user, layout: :horizontal, local: true do |form| %>
    <%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
    <%= form.password_field :password, placeholder: "Password" %>
    <%= form.select :status, [['activated', 1], ['blocked', 2]], prompt: "Please Select" %>
    <%= form.textarea :comments %>
    <%= form.checkbox :terms, label: "Agree to Terms" %>
    <%= form.collection_checkboxes :checkboxes, @collection, :id, :street %>
    <%= form.collection_radio_buttons :radio_buttons, @collection, :id, :street %>
    <%= form.file_field :file %>
    <%= form.datetime_select :created_at, include_blank: true %>
    <%= form.datetime_field :updated_at, class: "w-auto" %>

    <%= form.submit %>
  <% end %>
<% end %>

<h3>With Validation Error</h3>

<%= form_with_source do %>
  <%= bootstrap_form_for @user_with_error, layout: :horizontal do |form| %>
    <%= form.alert_message "This is an alert" %>
    <%= form.error_summary %>
    <%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
    <%= form.collection_checkboxes :misc, @collection, :id, :street %>
    <%= form.submit %>
  <% end %>
<% end %>

<h3>Inline Form</h3>

<%= form_with_source do %>
  <%= bootstrap_form_for @user, layout: :inline do |form| %>
    <%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
    <%= form.password_field :password, placeholder: "Password" %>
    <%= form.checkbox :terms, label: "Agree to Terms" %>
    <%= form.collection_checkboxes :misc, @collection, :id, :street %>
    <%= form.submit %>
  <% end %>
<% end %>

<h3>Simple Action Text Example</h3>

<%= form_with_source do %>
  <%= bootstrap_form_for @user, url: "/" do |form| %>
    <%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else" %>
    <%= form.password_field :password, placeholder: "Password" %>
    <%= form.checkbox :terms, label: "Agree to Terms" %>
    <%= form.collection_checkboxes :misc, @collection, :id, :street %>
    <%= form.rich_textarea(:life_story) %>
    <%= form.submit %>
  <% end %>
<% end %>

<h3>Floating Labels</h3>

<%= form_with_source do %>
  <%= bootstrap_form_for @user do |form| %>
    <%= form.email_field :email, placeholder: "Enter Email", label: "Email address", help: "We'll never share your email with anyone else", floating: true %>
    <%= form.password_field :password, placeholder: "Password", floating: true %>
    <%= form.text_field :misc, floating: true %>
    <%= form.textarea :comments, floating: true %>
    <%= form.select :status, [["Active", 1], ["Inactive", 2]], include_blank: "Select a value", floating: true %>
    <%= form.submit %>
  <% end %>
<% end %>
